package com.cancan.demo.apidebouncing.service;

import com.cancan.demo.apidebouncing.annotation.RequestLock;
import com.cancan.demo.apidebouncing.req.AddReq;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;

import java.util.concurrent.TimeUnit;

@Service
public class UserService {



    @RequestLock(prefix = "testapi",expire = 20L,timeUnit = TimeUnit.SECONDS)
    public ResponseEntity<String> add(AddReq addReq) {

        return ResponseEntity.ok("成功啦");
    }
}
